package day04;
import java.util.Scanner;
//
public class Guessing {
    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
        /*
        int num4 = (int)(Math.random()*1000+1);//1~1000
        System.out.println(num4);
        System.out.println("欢迎来到数字大小游戏");
        System.out.println("请开始你的游戏“猜吧”！");
        int guess;
        do {
            guess = scan.nextInt();//1+3
            if (guess>num4){
                System.out.println("猜大了");
            }else if (guess<num4){
                System.out.println("猜小了");
            }else{
                System.out.println("恭喜你猜对了");
            }
        }while (guess != num4);//1

         */



        int num = 600;
        System.out.println("欢迎来到数字大小游戏");
        System.out.println("请开始你的游戏“猜吧”！");
        int guess = scan.nextInt();//1.
        while(guess!=num){//2.
            //猜大了    猜小了
            if (guess>num){
                System.out.println("猜大了，请继续");
            }else {
                System.out.println("猜小了，请继续");
            }
            guess = scan.nextInt();//3.
        }
        System.out.println("恭喜你猜对了");
        System.out.println("下一关");
        int num1 = 666,num2 = 888;
        System.out.println("请开始你的游戏,需要猜对两个数字");
        int guess1 = scan.nextInt();
        while (guess1!=num1) {
            if (guess1 > num1) {
                System.out.println("猜大了，请继续");
            } else {
                System.out.println("猜小了，请继续");
            }
            guess1 = scan.nextInt();
        }
                System.out.println("还有一个，继续猜噢");
        while (guess1!=num2) {
            if (guess1>num2){
                System.out.println("猜大了，请继续");
            }else {
                System.out.println("猜小了，请继续");
            }
            guess1 = scan.nextInt();
        }
        System.out.println("恭喜你猜对了");
        System.out.println("难度升级");
        int num5 = (int)(Math.random()*1000+1);
        int guess2 = scan.nextInt();
        while(guess2!=num5){
            //猜大了    猜小了
            if (guess2>num5){
                System.out.println("猜大了，请继续");
            }else {
                System.out.println("猜小了，请继续");
            }
            guess2 = scan.nextInt();
        }
        System.out.println("恭喜你猜对了");



    }
}
